<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height border-hover-style">
    <div class="Showroom-parent" v-if="props.info.digitalShowroom">
      <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
    </div>
    <img class="outline-parent-bg" :src="publicUrls + 'free/style17/Level1outlineStyle1.webp'" alt="" />
    <div class="outline jy-style-height">
      <div class="content-tiitle">
        {{ props.info.text }}
      </div>
      <div class="outline-content">
        <div class="outline-subTitle">
          <p v-if="props.info.subTitle">{{ props.info.subTitle }}</p>
        </div>
        <div class="cover" v-if="props.info.value" :class="!props.info.remarks && 'cover-no'">
          <div class="cover-box">
            <img
              class="coverImg"
              @click="ImgVisible = true"
              :src="urls + props.info.value + '?imageView2/3/format/webp'"
              alt=""
            />
          </div>
        </div>
        <TextMax
          v-if="props.domShow"
          :infoData="props.info"
          :data="props.info.remarks"
          :title="props.info.text"
          :row="
            props.info.value && !props.info.subTitle
              ? 6
              : props.info.value && props.info.subTitle
              ? 6
              : !props.info.value && props.info.subTitle
              ? 16
              : 17
          "
        ></TextMax>
      </div>
    </div>
    <!-- <img class="shadow" :src="publicUrls + 'free/style11/firstLevelOutline1Shadow.png'" alt="" /> -->
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free17Style1',
});
</script>

<script setup lang="ts">
import ExpandableText from './../../../textMode/ExpandableText.vue';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style17.vue';
import { publicUrls } from '@/utils/minxin';
import { getTextHtml } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { defineComponent, nextTick, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { useProjectStore } from '@/store';
import { useRoute } from 'vue-router';
import getId from '@/utils/getId';
const store = useProjectStore();
const ImgVisible = ref(false);
const route = useRoute();

const props = defineProps({
  info: {
    type: Object,
  },
  indexs: {
    type: Number,
  },
  domShow: {
    type: Boolean,
  },
});
// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
// 打开IP弹窗
const openIp = (indexs: number) => {
  store.setCustomDialogShow(true, indexs);
};
</script>

<style scoped lang="less">
.outline-parent {
  position: relative;
  margin-top: 0;
  margin-right: 280px;
  .shadow {
    width: 235px;
    height: 250px;
    position: absolute;
    bottom: 0;
    right: -235px;
  }
}

.outline-parent-bg {
  width: 581px;
  height: 100%;
}
.Showroom-parent {
  position: absolute;
  top: 42px;
  right: 42px;
  z-index: 21;
}
.outline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: start;
  width: 100%;
  padding-left: 148px;
}
.outline-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 180px 30px 98px 30px;
}
.content-tiitle {
  width: 61px;
  height: auto;
  background: linear-gradient(270deg, #e7a859 30%, #ffdaac 70%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: SJxingkai-C;
  font-size: 30px;
  line-height: 61px;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 2px;
  position: relative;
  padding: 20px 0;
  margin-top: 260px;
  &::after {
    content: '';
    width: 100%;
    height: 100%;
    background: linear-gradient(359deg, #7f1a10 0.03%, #99241b 99.97%);
    border: 2px solid #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transform: skew(0, 10deg);
    box-shadow: 4px 4px 4px rgba(45, 2, 0, 0.28);
  }
}

.outline-subTitle {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  p {
    color: rgba(255, 227, 162, 0.9);
    text-align: center;
    font-family: 'PingFang SC';
    font-size: 19px;
    line-height: 28px;
  }
}
.cover-no {
  border-radius: 14px;
  .coverImg {
    border-radius: 12px;
  }
}
.cover {
  display: flex;
  align-items: center;
  width: 100%;
  height: 260px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(4px);
  flex: 1;
  position: relative;
  margin-bottom: 20px;
  padding: 2px;
  overflow: hidden;
  .cover-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
    &:hover img {
      transform: scale(1.2);
    }
    .coverImg {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #ac786e;
      transition: all 0.3s ease;
    }
  }
}
::v-deep .textMore-box {
  width: 100%;
  display: flex;
  align-items: center;
}
::v-deep .van-text-ellipsis {
  font-family: PingFang SC !important;
  font-size: 16px !important;
  color: rgba(255, 227, 162, 0.8) !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: rgba(255, 227, 162, 1) !important;
  font-weight: 700 !important;
}
</style>